<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title>合同抄单审核</title>
</head>
<body>
<div class="contant">
<div class="row">
        <div class="content applylist">
            <div class="box">
                <h1>内勤部-合同抄单审核</h1>
                <div class="list-block">
                      <div class="row">
                    <form action='{:U("ChaoDan/Prints")}' class="form-inline text-right m-b-5 fr">
                        <label>用户名称:</label> <input type="text" name="user_name" placeholder="请输入名称" value={$_GET['user_name']} >
                        <label>手机号:</label> <input type="text" name="telephone" placeholder="请输入手机号" value={$_GET['telephone']} >
                        <label>录入时间: </label> <input type="date" name="create_time_beg" placeholder="请选择时间" value={$_GET['create_time_beg']}><em>~</em>
                        <input type="date" name="create_time_end" placeholder="请选择时间" value={$_GET['create_time_end']}>
                        <label>状态:</label> <input type="text" name="" placeholder="请选择用户状态">
                        <button class="search" type="submit"><img src="__IMG__/search.png" alt="">查询</button>
                    </form>
                    </div>
                    <div class="row">
                        <table class="list">
                                <tr>
                                    <th>编号</th>
                                    <th>申请人</th>
                                    <th>身份证号</th>
                                    <th>手机号</th>
                                    <th>业务部门</th>
                                    <th>申请时间</th>
                                    <th>状态</th>
                                    <th>进入当前状态时间</th>
                                    <!-- <th>审核状态</th> -->
                                    <th>贷款银行</th>
                                    <th>操作</th>
                                </tr>
                                <volist name="list" id="user">
                                    <tr>
                                        <td>{$user.entry_no}</td>
                                        <td>{$user.user_name}</td>
                                        <td>{$user.identity_no}</td>
                                        <td>{$user.telephone}</td>
                                        <td>{$user.department_name}</td>
                                        <td>{$user.create_time|date='Y-m-d H:i:s', ###}</td>
                                        <td>
                                            待区域经理审核
                                        </td>
                                        <td>{$user.create_time|date='Y-m-d H:i:s', ###}</td>
                                        <td>{$user.bank_short_name}</td>
                                        <td>
                                            <a class="pass" data-id='{$user.id}' data-status='{$user.mat_status}'>通过</a>
                                            &nbsp;&nbsp;
                                            <a class="reject" data-id='{$user.id}' data-status='{$user.mat_status}'>驳回</a>
                                        </td>
                                        <!-- <td><a href="{:U('Check/Region_check?user_id='.$user['id'])}">审核</a></td> -->
                                    </tr>
                                </volist>
                        </table>
                    </div>
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>
    <script type="text/javascript">
        $('.pass').click(function(){
         var id = $(this).data('id'),mat_status = $(this).data('status');
         var r = confirm('是否通过');
         if(r==true){
            $.post('{:U("ChaoDan/Check_Info")}',{type:5,user_id:id,id:id,matStatus:mat_status},function(data){
              console.log(data);
              data = JSON.parse(data);
              if (data.status == 'success') {
                alert(data.msg);
                window.location.reload()
              }else{
                alert(data.msg);
              }
            });
         }
      });

      $('.reject').click(function(){
         var id = $(this).data('id'),mat_status = $(this).data('status');
         var r = confirm('是否驳回');
         if(r==true){
            $.post('{:U("ChaoDan/Check_Info")}',{type:99,user_id:id,id:id,matStatus:mat_status},function(data){
              console.log(data);
              data = JSON.parse(data);
              if (data.status == 'success') {
                alert(data.msg);
                window.location.reload()
              }else{
                alert(data.msg);
              }
            });
         }
      });
    </script>
</body>
</html>
